export default {
  namespace: "modifyFundPassword",
  state: {
    loadPage: 1,
    content:'',
    modalControl:false,
  },
  subscriptions: {
    setup({ dispatch, history }) {
      history.listen(location => {
        // 用户刷新页面时候请求编排接口
        if (location.pathname === "/modifyFundPassword") {
          dispatch({
            type: "modules/getModules",
            payload: {
              pathname: "",
              businessId: "1231241207",
              process: "modifyFundPassword",
              title: "资金密码修改"
            }
          });
        }
      });
    }
  },
  reducers: {
    changePage(state, { payload }) {
      //交易金密码下一步重新返回资金密码修改
      payload.loadPage == 4
        ? (payload.loadPage = 1)
        : (payload.loadPage = payload.loadPage);
      console.log(payload);
      return {
        ...state,
        ...payload
      };
    }
  }
};
